package com.atguigu.gmall.product.controller;

import com.atguigu.gmall.common.result.Result;

import com.atguigu.gmall.product.cron.SkuIdBloomTask;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Objects;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/9/1 20:09
 */
@RestController
@RequestMapping("/admin/product")
public class rebuildBloomController {
    @Autowired
    SkuIdBloomTask skuIdBloomTask;


    @GetMapping("/rebuild")
    public Result rebuildBloomFilter() {
        skuIdBloomTask.rebuildBloomFilter();
        return Result.ok();
    }


}
